package com.ideal.web.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ideal.handler.constants.Constants;
import com.ideal.handler.controller.ControllerBase;

/**
* @ClassName: IdealLoginController
* @Description: TODO
* @author YeQing
* @date 2013年8月20日 下午1:37:05
*/
@Controller
public class IdealLoginController extends ControllerBase{

	private Logger log = Logger.getLogger(this.getClass());

	/**
	* @Title: gotoIndexHtml
	* @Description: TODO
	* @param @param modelMap
	* @param @param request
	* @param @param response
	* @param @return
	* @return Object
	* @throws
	 */
	@RequestMapping(value = "/index", method = RequestMethod.GET)
	public Object gotoIndexHtml(ModelMap modelMap,
			HttpServletRequest request, HttpServletResponse response) {

		Map<String, Object> returnMap = this.returnMap();

		returnMap.put("site", "yq");
		log.info(Constants.STATIC_SERVICE);

		return returnMap;
	}

	/**
	* @Title: gotoNavFtl
	* @Description: TODO
	* @param @param modelMap
	* @param @param request
	* @param @param response
	* @param @return
	* @return Object
	* @throws
	 */
	@RequestMapping(value = "/nav", method = RequestMethod.GET)
	public Object gotoNavFtl(ModelMap modelMap,
			HttpServletRequest request, HttpServletResponse response) {
		Map<String, Object> mapDate=new HashMap<String, Object>();
		System.out.println("12123");
		request.setAttribute("username", "yeqing");
		return "menu/nav";
	}


	/**
	* @Title: getHeader
	* @Description: TODO
	* @param @param modelMap
	* @param @param request
	* @param @param response
	* @param @return
	* @return Object
	* @throws
	 */
	@RequestMapping(value = "/ajax/getheader", method = RequestMethod.GET)
	@ResponseBody
	public Object getHeader(ModelMap modelMap,
			HttpServletRequest request, HttpServletResponse response) {

		return this.succMessage("ajax");
	}




}
